Placing objects logically on different layers can enable the user to make certain layers invisible while not working with them.
The following example uses a button on a screen to toggle the visibility of a layer containing a Tank Control and a Text control.
To Toggle Layer Visibility in Run Mode
|
Sub btnShowHide_EventClick() Dim This : Set This = btnShowHide If TheView.Layer("Tank Layer") = True Then TheView.Layer("Tank Layer") = False This.Text = "Show Tank" Else TheView.Layer("Tank Layer") = True This.Text = "Hide Tank" End If End Sub |
The visibility of individual objects can be controlled through script using their respective Visible properties. Layer visibility can be more practical for controlling visibility of multiple objects, as in the above example. Another application of layer visibility is a screen that includes a type of "Edit mode," allowing the user to update properties in the system, then apply them. Switching into Edit mode would make these editing controls visible, and clicking an Apply button would hide them again and apply any changes.